From: Carlos Garnacho Date: Tue, 12 Mar 2019 01:14:07 +0000 (+0100) Subject: dnd: Multiply drag threshold by output scale X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~871^2^2~34 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=62233a4db4ff94cfe091f6696dbca4f17a3cffdc;p=gnome-shell.git dnd: Multiply drag threshold by output scale So it comes out right on hidpi, and consistent with clients. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/455 --- diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 929ee0e22..367815dbd 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -450,7 +450,8 @@ var _Draggable = class _Draggable { let [stageX, stageY] = event.get_coords(); // See if the user has moved the mouse enough to trigger a drag - let threshold = St.Settings.get().drag_threshold; + let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; + let threshold = St.Settings.get().drag_threshold * scaleFactor; if (!currentDraggable && (Math.abs(stageX - this._dragStartX) > threshold || Math.abs(stageY - this._dragStartY) > threshold)) {